package com.coin900.coin.service.sbi;

import com.coin900.coin.persist.sbi.SbiCityVO;
import com.value.mybatis.IDaoRouter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author shui
 * @create 2017-11-21
 **/
@Service
public class SbiCityService implements ISbiCityService {

    @Override
    public List<SbiCityVO> loadSbiCity(Map<String, Object> params){
        return daoRouter.query("SbiCity.loadSbiCity",params);
    }

    @Override
    public String getCityName(Long id) {
        return daoRouter.queryForObject("SbiCity.loadSbiCityName",id);
    }

    @Override
    public void insertSbiCity(SbiCityVO vo){
        daoRouter.insert("SbiCity.insertSbiCity", vo);
    }

    @Override
    public void updateSbiCity(SbiCityVO vo){
        daoRouter.update("SbiCity.SbiCity", vo);
    }

    @Override
    public void deleteSbiCity(SbiCityVO vo){
        daoRouter.update("SbiCity.deleteSbiCity", vo);
    }

    @Autowired
    private IDaoRouter daoRouter;

}